# OcSort,ByteTrack,BotSort,StrongSort,DeepOcSort,ImprAssocTrack

clear

# loop for trackers in shell

result_dir="/home/konghaomin/Datasets/MaritimeTrack_Full_Same_73/DanceTrack/E2E_Result"

# List Tracker
# Ensure the result_dir exists
if [ ! -d "$result_dir" ]; then
    echo "The directory $result_dir does not exist."
    exit 1
fi

# Initialize an empty array to hold tracker directories
tracker_dirs=()

# Iterate over all entries in the result_dir and add directories to the array
for entry in "$result_dir"/*/; do
    if [ -d "$entry" ]; then
        # Extract just the directory name (tracker name)
        tracker=$(basename "$entry")
        tracker_dirs+=("$tracker")  # Add tracker name to the array
    fi
done

for tracker in "${tracker_dirs[@]}";
do
    echo "Evaluating ${tracker}..."

	profile_name="${tracker}"

	# python scripts/run_mot_challenge.py \
	# 	--TRACKERS_TO_EVAL ${profile_name} \
	# 	--METRICS HOTA CLEAR Identity \
	# 	--USE_PARALLEL True \
	# 	--NUM_PARALLEL_CORES 64 \
	# 	--GT_FOLDER /home/konghaomin/Datasets/MaritimeTrack_Full_Same/DanceTrack/val \
	# 	--TRACKERS_FOLDER /home/konghaomin/Datasets/MaritimeTrack_Full_Same/DanceTrack/E2E_Result \
	# 	--SEQMAP_FILE /home/konghaomin/Datasets/MaritimeTrack_Full_Same/DanceTrack/val_seqmap.txt \
	# 	--SKIP_SPLIT_FOL True \
	# 	--SPLIT_TO_EVAL val > "Result_${profile_name}.log"

	python Eval_DanceTrack.py \
		${result_dir}/${profile_name} \
		> "Result_${profile_name}.log"
	
	echo "Done evaluating ${tracker}..."
done
